<?php $this->fetch('public/head') ?>
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="<?php echo input('lang','cn')=='cn'?'layui-this':'' ?>"><a href="<?php echo url('lxwm',['lang'=>'cn']) ?>">编辑中文内容</a></li>
        <li class="<?php echo input('lang')=='en'?'layui-this':'' ?>"><a href="<?php echo url('lxwm',['lang'=>'en']) ?>">编辑英文内容</a></li>
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" action="<?php echo url('lxwm') ?>" method="post">
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-block">
                        <blockquote class="layui-elem-quote">当前语言：<?php echo input('lang','cn')=='cn'?'中文':(input('lang','cn')=='en'?'英文':'') ?></blockquote>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="content[title]" value="<?php echo $rows['content']['title'] ?>" required  lay-verify="required" class="layui-input">
                    </div>
                </div>
                <?php if(input('lang','cn')=='cn'): ?>
                <div class="layui-form-item">
                    <label class="layui-form-label">名称(英文)</label>
                    <div class="layui-input-block">
                        <input type="text" name="content[title_en]" value="<?php echo $rows['content']['title_en'] ?>" class="layui-input">
                    </div>
                </div>
                <?php endif; ?>
                <div class="layui-form-item">
                    <label class="layui-form-label">校区一</label>
                    <div class="layui-input-block">
                        <textarea name="content[xq1]" class="layui-textarea"><?php echo $rows['content']['xq1'] ?></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">校区二</label>
                    <div class="layui-input-block">
                        <textarea name="content[xq2]" class="layui-textarea"><?php echo $rows['content']['xq2'] ?></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">校区三</label>
                    <div class="layui-input-block">
                        <textarea name="content[xq3]" class="layui-textarea"><?php echo $rows['content']['xq3'] ?></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">校区四</label>
                    <div class="layui-input-block">
                        <textarea name="content[xq4]" class="layui-textarea"><?php echo $rows['content']['xq4'] ?></textarea>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">百度坐标</label>
                    <div class="layui-input-block">
                        <input type="text" name="content[coord]" value="<?php echo $rows['content']['coord'] ?>" placeholder="请输入百度坐标" class="layui-input">
                        <a target="_blank" href="http://api.map.baidu.com/lbsapi/getpoint/index.html"><u>点击此处获取百度地图坐标</u></a>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">发布时间</label>
                    <div class="layui-input-block">
                        <input type="text" name="add_time" value="<?php echo $rows['add_time']?:date('Y-m-d H:i:s') ?>" class="layui-input datetime">
                    </div>
                </div>
                <input type="hidden" name="lang" value="<?php echo input('lang','cn') ?>">
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<?php $this->fetch('public/script') ?>
